package com.ycm.dto;

import com.ycm.enums.IdCardType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author ycm
 * @date 2024-11-13
 */
@Data
public class UserSaveDto {
    /**
     * 姓名
     */
    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "姓名不能为空")
    private String name;

    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickName;

    /**
     * 年龄
     */
    @Schema(description = "年龄", requiredMode = Schema.RequiredMode.REQUIRED)
    @Min(value = 0, message = "年龄不能小于0")
    private int age;

    /**
     * 证件类型
     */
    @Schema(description = "证件类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "证件类型不能为空")
    private IdCardType idCardType;

    /**
     * 证件号
     */
    @Schema(description = "证件号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "证件号不能为空")
    private String idCardNo;
}
